package it.uniroma1.di.machinelearning;

import weka.classifiers.Classifier;
import weka.classifiers.bayes.NaiveBayes;
import weka.classifiers.functions.SMO;
import weka.classifiers.meta.Stacking;
import weka.classifiers.trees.J48;
import weka.core.Instances;

public class StackingRunnable extends ClassifierRunnable{
	
	

	public Classifier createAndBuildClassifier(Instances instances)
			throws Exception {

		 Stacking stacking= new Stacking();
		 stacking.setNumExecutionSlots(10);
		 Classifier[] classifiers = new Classifier[3];
		 classifiers[0]=new J48();
		 classifiers[1]=new SMO();
		 classifiers[2]=new NaiveBayes();
		 stacking.setClassifiers(classifiers);
		 
		 stacking.setMetaClassifier(metaClassifier);
		 
		 String[] options = stacking.getOptions();
		 stacking.setDebug(true);
		 stacking.buildClassifier(instances);

		 return stacking;
	}

	

	public static void main(String[] args) {
		StackingRunnable stackingManager = new StackingRunnable();
		Thread thread = new Thread(stackingManager);
		thread.run();
	}
}
